.orderDetail {
  .featuredProfile {
    text-align: center;
    padding: $padMd;
    min-height: 143px;

    .avatar {
      width: 70px;
      height: 70px;
      margin: 0 auto 7px;
    }
  }

  .mainCtaWrap {
    .btn {
      width: 100%;
    }
  }

  .tabHeads {
    .unreadBadge {
      display: inline-block;
      width: 20px;
      height: 20px;
      text-align: center;
      font-weight: bold;
      padding-top: 3px;
      font-size: $tx6;
      margin-left: 5px;

      &:empty {
        opacity: 0;
        // needed so position of the badge is consistent with the non-empty
        // version and there's no jump as you toggle between the two
        vertical-align: top;
      }
    }

    .contractMenuItem {
      text-decoration: none;
      cursor: default;

      .contractLabel:hover {
        text-decoration: underline;
        cursor: pointer;
      }
    }
  }

  .mainContent {
    min-height: 300px;
  }

  .summaryTab, .contractTab {
    padding: $padMd;
  }

  .backToSummaryWrap {
    position: absolute;
    max-width: 250px;
    left: $padLg;
  }

  .discussionTab {
    position: relative;
    overflow: hidden;

    &.loadingMessages {
      .convoMessagesWindow {
        .spinner {
          display: block;
          width: 55px;
          height: 55px;
        }
      }

      &.noMessages {
        .convoMessagesWindow {
          .spinner {
            @include center();
          }

          .messagesFetchError {
            @include center();
          }
        }
      }
    }

    &.noMessages {
      .convoMessagesWindow {
        .messagesFetchError {
          @include center();
          margin: 0;
        }
      }
    }

    &.isTyping {
      .typingIndicator {
        transform: translate(-50%, 0);
      }
    }

    .convoMessagesWindow {
      padding: $padLg;
      overflow-x: hidden;
      overflow-y: auto;
      height: 375px;

      .spinner {
        display: none;
        margin: 0 auto;
        padding: $pad;
      }

      .messagesFetchError {
        margin-top: 10px;
        margin-bottom: 5px;
      }

      .chatConvoMessages {
        padding: 10px 0;

        .convoMessage {
          .msgContentBox {
            padding: 13px;
            margin-top: 3px;
            display: inline-block;
            max-width: 547px;
            line-height: 14px;
            text-align: left;
            position: relative;

            & > span {
              word-break: break-word;
              white-space: pre-wrap;
            }

            img {
              max-width: 100%;
            }

            &.read {
              &::after {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                bottom: 0;
                width: 4px;
                // colored by theme
              }
            }
          }

          .avatar {
            width: 45px;
            height: 45px;
            margin-top: 2px;
          }
        }
      }
    }

    .typingIndicator {
      position: absolute;
      left: 50%;
      transform: translate(-50%, -110%);
      border-style: solid;
      border-width: 1px;
      border-top-width: 0;
      z-index: 1;
      padding: $padSm $pad;
      transition: transform 0.3s ease;

      .typingUsername {
        display: inline-block;
        vertical-align: middle;
      }
    }

    .convoFooter {
      border-top-style: solid;
      border-top-width: 1px;
      padding: $pad;

      textarea {
        border-width: 0;
        height: 90px;

        &::-webkit-scrollbar-thumb {
          background-color: transparent;
        }

        &::-webkit-scrollbar-track {
          background-color: transparent;
        }
      }

      .btnSend {
        width: 125px;
      }

      .msgModUnableToChat {
        display: none;
      }

      &.preventModChat {
        textarea {
          display: none;
        }

        .btnSend {
          @include disabled;
        }

        .msgModUnableToChat {
          padding: $pad;
          display: block;
        }
      }
    }
  }

  .contractTab {
    .renderjson {
      padding: $pad;
      overflow: auto;

      .key {
        font-weight: bold;
      }
    }

    .copied {
      position: absolute;
      top: 0;
      right: 0;
      opacity: 0;
      pointer-events: none;
    }
  }

  .summaryTab {
    h2 {
      margin-bottom: 5px;
      display: inline-block;
    }

    .statusProgressBarContainer {
      padding: 10px 20px;
      height: 50px;
    }

    .copiedToClipboard {
      position: absolute;
      transform: translateY(-100%);
    }

    .payment, .refunded {
      .rejectConfirm {
        left: 50%;
        transform: translateX(-50%);
        top: 39px;
      }
    }

    .addressNotes {
      margin-top: $pad;
    }

    .cryptoPaymentAddress {
      flex-shrink: 1000;
    }

    .statusIconCol {
      text-align: center;
      flex-shrink: 0;

      span, i {
        width: 35px;
        height: 35px;
        display: inline-block;
        border-radius: 50%;
        border-style: solid;
        border-width: 1px;
        font-size: 30px;

        &.ion-ios-checkmark-empty {
          font-size: 36px;
          line-height: 1;
        }

        &.ion-cube {
          font-size: 17px;

          &::before {
            padding-top: 8px;
          }
        }

        &.ion-ios-folder {
          font-size: 15px;

          &::before {
            padding-top: 9px;
          }
        }

        &.ion-ios-body {
          font-size: 20px;

          &::before {
            padding-top: 7px;
          }
        }

        &.ion-alert-circled {
          font-size: 17px;

          &::before {
            padding-top: 8px;
          }
        }

        &.ion-cash {
          font-size: 24px;

          &::before {
            padding-top: 6px;
            padding-left: 2px;
          }
        }

        &.ion-ios-rewind {
          font-size: 26px;

          &::before {
            padding-top: 4px;
          }
        }
      }
    }

    .avatarCol {
      flex-shrink: 0;
      width: 38px;
      height: 38px;
      border-width: 2px;
      border-style: solid;
    }

    .orderDetails {
      position: relative;

      .listingThumbCol {
        width: 42px;
        height: 42px;
        background-size: cover;
        background-position: center;
      }

      hr {
        margin-top: 13px;
        margin-bottom: 13px;
      }

      .orderDetailsCopiedToClipboard {
        position: absolute;
        transform: translateY(-2px);
        font-size: $tx6;
      }

      .memo {
        white-space: pre-wrap;
      }

      .cryptoAddress {
        .cryptoIcon {
          position: relative;
          top: 3px;
        }
      }
    }

    .acceptedEvent {
      .refundConfirm {
        left: 50%;
        transform: translateX(-50%);
        top: 39px;
      }
    }

    .orderCompleteEvent, .completeOrderForm {
      .ratingsCol {
        .ratingStrip {
          .ratingsIcons {
            vertical-align: middle;
            .ratingIcon {
              .emoji {
                font-size: 19px;
                margin-right: 0.1em;
              }
            }
          }
          .ratingNumbers {
            font-size: 13px;
          }
        }
      }
    }

    .completeOrderForm {
      .ratingsCol {
        .errorList {
          margin-top: $padTn;
          margin-bottom: 2px;
          font-size: $tx5b;

          li:last-child {
            margin-bottom: 0;
          }
        }
      }
    }

    .disputePayoutEvent {
      .avatarCol {
        position: relative;
        top: -2px;
      }

      .acceptPayoutConfirm {
        left: 50%;
        transform: translateX(-50%);
        top: 45px;
      }
    }

    .payForOrderWrap {
      &:empty {
        display: none;
      }
    }

    .timeoutInfo {
      margin-top: 27px;
      position: relative;

      .headerIconWrap {
        border-style: solid;
        border-width: 1px;
        border-radius: 50%;
        @include center(true, false);
        transform: translate(-50%, -50%);

        i {
          font-size: $tx2b;
        }
      }

      .innerContent {
        padding-top: 25px;
      }
    }
  }

  .fulfillOrderTab, .disputeOrderTab, .resolveDisputeTab {
    hr {
      margin-left: $padLg;
      margin-right: $padLg;
      width: calc(100% - #{$padLg * 2})
    }

    .buttonBar {
      padding: $padMd $padLg $padLg;
    }
  }

  .disputeOrderTab, .resolveDisputeTab {
    .avatar {
      width: $thumbTn;
      height: $thumbTn;
    }
  }

  .resolveDisputeTab {
    .resolveConfirm {
      bottom: 45px;
      left: 50%;
      transform: translateX(-50%);
    }

    .inputBuyerAmountWrap, .inputVendorAmountWrap {
      position: relative;
      max-width: 175px;

      &::after {
        content: '%';
        position: absolute;
        right: 15px;
        top: 20px;
        transform: translateY(-50%);
      }

      input {
        padding-left: 45px;
        padding-right: 40px;
      }

      .avatar {
        position: absolute;
        top: 10px;
        left: 13px;
      }
    }

    .vendorContractUnarrivedMsg,
    .buyerContractUnarrivedMsg,
    .vendorProcErrContractUnarrivedMsg {
      display: none;
    }

    label[for=resolveDisputeBuyerAmount],
    label[for=resolveDisputeVendorAmount] {
      line-height: 2rem;
    }

    @mixin contractUnavailable($field) {
      label[for=resolveDispute#{capitalize($field)}Amount]::after {
        display: none;
      }

      .input#{capitalize($field)}AmountWrap {
        @include disabled;
      }

      .#{$field}ContractUnarrivedMsg {
        display: block;
      }
    }

    &.vendorContractUnavailable {
      @include contractUnavailable(vendor);
    }

    &.buyerContractUnavailable {
      @include contractUnavailable(buyer);
    }

    &.vendorProcessingError {
      @include contractUnavailable(vendor);

      .vendorProcErrContractUnarrivedMsg {
        display: block;
      }

      .vendorContractUnarrivedMsg {
        display: none;
      }
    }
  }

  .verifiedMod {

    & > .badge {
      position: relative;
      top: -1px;
      margin-right: 0.3em;
    }

    .tooltipWrapper {

      .arrowBoxWrapper {
        height: inherit;
        width: 12px; // the same as the info icon
        right: 0;

        .arrowBox {
          top: 11px;
          left: 50%;

          .badge {
            top: -2px;
            position: relative;
          }
        }
      }
    }
  }
}
